
Ext.define('js.project.ProjectMergerCopyPage', {
    extend: 'Ext.form.Panel',
    requires: ['js.Util', 'js.ctrl.Common'],
    controller: 'Common',
    config: {
        bodyPadding: '0 20 0 20',
        layout: {
            type: 'vbox',
            align: 'stretch'
        }
    },

    fieldDefaults: {
        labelWidth: 140,
        flex:1,
        allowBlank: false
    },
    initComponent: function () {

        Ext.QuickTips.init();
        Ext.form.Field.prototype.msgTarget = 'under';

        let ids={
            xtype:'textfield',
            name:'engineering_no',
            id:'engineering_no',
            hidden:true,
            readOnly:'true',
            ref:'engineering_no',
            labelWidth: 140,
            value:this.ids,
            fieldLabel: '工程编号',
            width:'80%',
            blankText:'LP名称(中文)必须输入.'
        };
        let project_name = {
            xtype: 'textfield',
            name: 'eng_name',
            id: 'eng_name',
            allowBlank: false,
            msgTarget : 'qtip',
            width:'100%',
            height:'36',
            margin:'10 0 10 0',
            labelSeparator: '',
            fieldLabel: '工程名称:'
        };
        let tbpanel={
            xtype:'panel',
            labelWidth: 140,
            width:'100%',
            height:'36',
            margin:'10 0 10 0',
            layout: {
                type: 'hbox',
                align: 'stretch'
            },
            items:[{
                xtype:'numberfield',
                name:'aboveGround_floor',
                id:'aboveGround_floor',
                width:'40%',
                msgTarget : 'qtip',
                allowDecimals:false,//不允许输入小数
                nanText:'请输入有效的整数',//无效数字提示
                maxValue:50,//最大值
                minValue:1,//最小值
                labelWidth: 140,
                ref:'lpType',
                fieldLabel: '层数（地上-地下）'
            },{
                xtype: 'label',
                cls:'lableshortA',
                text: '-',
                width:'2%',
                height:'36',
                margin: '0 0 0 10'
            },{
                xtype: 'numberfield',
                name:'underGround_floor',
                id:'underGround_floor',
                msgTarget : 'qtip',
                allowDecimals:false,//不允许输入小数
                maxValue:5,//最大值
                minValue:1,//最小值
                nanText:'请输入有效的整数',//无效数字提示
                ref:'shortnameZh',
                width:'18%',
                margin: '0 0 0 10'
            }]
        };
        let area={
            xtype:'panel',
            labelWidth: 140,
            width:'100%',
            height:'36',
            margin:'10 0 10 0',
            layout: {
                type: 'hbox',
                align: 'stretch'
            },
            items:[{
                xtype:'textfield',
                labelWidth: 140,
                name:'engineering_area',
                id:'engineering_area',
                msgTarget : 'qtip',
                ref:'lpType',
                width:'50%',
                fieldLabel: '总面积'
            },{
                xtype: 'label',
                cls:'lableshort',
                text: 'm²',
                width:'50%',
                height:'36',
                margin: '0 0 0 10'
            }]
        };

        this.items = [ids,project_name,tbpanel,area];

        this.callParent(arguments);
    }
});